import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method actList 所有活动列表
 * @method myAct 我的活动列表
 * @method logistics 物流信息
 * @method actDetail 活动详情
 * @method applyAct 申请活动
 * @method applyUpdate 修改申请活动时间
 * @method cancelApply 取消申请
 */
export function useActivityApi() {
	return {
		actList: (data: object) => {
			return request({
				url: '/act-list',
				method: 'post',
				data,
			});
		},
		myAct: (data: object) => {
			return request({
				url: '/my-act',
				method: 'post',
				data,
			});
		},	
		logistics: (data: object) => {
			return request({
				url: '/logistics',
				method: 'post',
				data,
			});
		},	
		actDetail: (data: object) => {
			return request({
				url: '/act-detail',
				method: 'post',
				data,
			});
		},
		applyAct: (data: object) => {
			return request({
				url: '/apply-act',
				method: 'post',
				data,
			});
		},
		applyUpdate: (data: object) => {
			return request({
				url: '/apply-update',
				method: 'post',
				data,
			});
		},
		getGameList: (data: object) => {
			return request({
				url: '/game-list',
				method: 'post',
				data,
			});
		},
		cancelApply: (data: object) => {
			return request({
				url: '/cancel',
				method: 'post',
				data,
			});
		},
	};
}
